<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <h2>Alterar Acesso</h2>

            <p:panel styleClass="container_24 clearfix " style="background: none; border: none;"> 
                <h:form id="form" acceptcharset="utf-8">
                    <p:growl id="msg" life="3000" autoUpdate="true"/>

                    <p class="subtitle">Alterar Login</p>

                    <p:panel id="loginPanel" styleClass="container_24 clearfix" style="border: none">
                        <br/>
                        <p:outputLabel value="Login : " styleClass="grid_3"/>
                        <p:inputText styleClass="grid_10" readonly="true" value="#{managerPesquisarUsuario.usuarioLogin.login}"/>
                        <div class="clear"/> 
                        <p:outputLabel value="Senha Antiga  " styleClass="grid_3"/> 
                        <p:password  id="senhaAntiga" feedback="true" styleClass="grid_10" value="#{managerPesquisarUsuario.senhaAntiga}"/>

                        <div class="clear"/>
                        <p:outputLabel value="Senha : " styleClass="grid_3"/>
                        <p:password styleClass="grid_10"  value="#{managerPesquisarUsuario.novaSenha}" feedback="true"/>
                        <div class="clear"/>
                        <p:outputLabel value="Senha  : " styleClass="grid_3"/>
                        <p:password styleClass="grid_10"  value="#{managerPesquisarUsuario.senha}" feedback="true"/>
                    </p:panel>

                    <br/>
                    <br/>
                    <div class="buttonAction">
                        <p:commandButton value="Salvar" actionListener="#{managerPesquisarUsuario.atualizarLogin()}" 
                                         icon="ui-icon-disk" styleClass="ui-priority-primary"
                                         update="@form, :form:senhaAntiga"  />
                        <p:button value="Cancelar" icon="ui-icon-circle-close"
                                  href="pesquisarusuario.xhtml" rendered="#{managerLayout.admin}" />
                        <p:button value="Cancelar" icon="ui-icon-circle-close"
                                  href="indexconfiguracao.xhtml" rendered="#{not managerLayout.admin}" />
                    </div>
                    <br/>

                </h:form>

            </p:panel> 
        </ui:define>
    </ui:composition>
</html>